﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlKhaiBaoMaHang.ascx.cs" Inherits="WebUserControl_KhaiBaoMatHang" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>

<script type="text/javascript"  src='<%=ResolveUrl("~/Scripts/jquery.alphanumeric.js")%>'></script>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() {
      $("#<%= txtGiaBan.ClientID %>").numeric({allow:"."});
      
      $("#<%= ImageButton5.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
});
$("#<%= btFind.ClientID %>").click(function () {
    $.blockUI({
        message: '<h1>Xin vui lòng chờ xử lý</h1>',
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#f00',
            opacity: .5,
            color: '#fff'
        }
    });
});
$("#<%= ImageButton6.ClientID %>").click(function () {
    $.blockUI({
        message: '<h1>Xin vui lòng chờ xử lý</h1>',
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#f00',
            opacity: .5,
            color: '#fff'
        }
    });
}); 
       $("#<%= ImageButton7.ClientID %>").click(function() { 
        if ($("#<%= txtMaHang.ClientID %>").val().length>0)
        {
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
        } 
        }); 
         
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script> 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
     <fieldset>
    <legend>Khai báo mã hàng</legend>
    </fieldset>
   
      <asp:Panel ID="Panel1" runat="server" BackColor="#EBEBEB" Height="33px" 
            Width="100%" BorderStyle="None">
            &nbsp;<asp:ImageButton CausesValidation="false" ID="ImageButton5" runat="server" 
                ImageUrl="~/image/Document.png" Height="25px" onclick="ImageButton5_Click" Width="25px" ToolTip="tạo mới" />
            &nbsp;<asp:ImageButton ID="ImageButton7" ToolTip="Lưu thông tin" runat="server" ImageUrl="~/image/Save.png" 
                onclick="ImageButton7_Click" Height="25px" Width="25px" />
            &nbsp;<asp:ImageButton ID="ImageButton6" Height="25px" runat="server" 
                ImageUrl="~/image/Find.png" CausesValidation="false" ToolTip="Tìm kiếm thông tin" onclick="ImageButton6_Click" Width="25px" />
            </asp:Panel>   
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="300px" Width="100%">
    <cc1:TabPanel runat="server" HeaderText="Thông tin chung" ID="TabPanel1" TabIndex="0">
    <ContentTemplate>
     <fieldset>
                    <div class="fm-req">
                     <label for="txtMaTuVanVien">Mã hàng</label>
                     <asp:TextBox ID="txtMaHang" runat="server" BackColor="Yellow" ReadOnly="true"   Width="200px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="txtMaHang" Display="None" ErrorMessage="Chưa nhập mã hàng"></asp:RequiredFieldValidator>
                     <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" 
                             Enabled="True" TargetControlID="RequiredFieldValidator1">
                    </cc1:ValidatorCalloutExtender>
                    </div>

              <div class="fm-req">
                     <label for="txtMaTuVanVien">Mô tả</label>
            <asp:TextBox ID="txtMoTa" runat="server" Width="300px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="txtMoTa" Display="None" ErrorMessage="Chưa nhập mô tả"></asp:RequiredFieldValidator>
        <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" 
            Enabled="True" TargetControlID="RequiredFieldValidator2">
        </cc1:ValidatorCalloutExtender>
             </div>
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Mã hàng 2</label>
                     <asp:TextBox ID="txtMaHang2" runat="server" MaxLength="18" Width="200px"></asp:TextBox>
             </div>
        
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Mô tả 2</label>
                     <asp:TextBox ID="txtMoTa2" runat="server"  Width="300px"></asp:TextBox>
             </div>
          <div class="fm-re">
                     <label for="txtMaTuVanVien">Mã BarCode</label>
                      <asp:TextBox ID="txtBarcode" runat="server" MaxLength="18" Width="200px"></asp:TextBox>
           </div>
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Đơn vị tính</label>
                     <asp:TextBox ID="txtDVT" runat="server" MaxLength="18" Width="200px"></asp:TextBox>
             </div>
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Thuế VAT</label>   
                     <asp:DropDownList ID="DropThueNhap" runat="server" Width="200px"></asp:DropDownList>
            </div>
            
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Ngành hàng</label>
                     <asp:DropDownList ID="DropNganhHang" runat="server" Width="200px"></asp:DropDownList>
            </div>
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Nhãn hiệu</label>
                     <asp:DropDownList ID="DropNhanHieu" runat="server" Width="200px"></asp:DropDownList>
            </div>
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Sản phẩm</label>
                     <asp:DropDownList ID="DropSanPham" runat="server" Width="200px"></asp:DropDownList>
            </div>
            <div class="fm-re">
                     <label for="txtMaTuVanVien">Giá bán</label>
                     <asp:TextBox ID="txtGiaBan" runat="server"></asp:TextBox>
            </div>
         <div class="fm-re">
                     <label for="txtMaTuVanVien">Trạng thái</label>
                    <asp:DropDownList ID="DropTrangThai" runat="server" TabIndex="8"  Width="200px"></asp:DropDownList>
         </div>
         </fieldset>
    </ContentTemplate>
</cc1:TabPanel>
    
    <cc1:TabPanel ID="TabPanel4" runat="server" HeaderText="Tìm kiếm" TabIndex="1">
        <ContentTemplate>
        <fieldset>                       
                      <div class="fm-req">
                       <label for="TxtMaNganhHang">Nhập thông tin cần tìm:</label> 
                <asp:TextBox ID="txtFind" runat="server" Width="200px">
                </asp:TextBox>
                <asp:Button ID="btFind" runat="server" Width="100px" Text="Tìm kiếm" CausesValidation="false" 
                            onclick="btFind_Click" />
                     </div>
                     </fieldset>
                              <br />
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                            GridLines="None" onpageindexchanging="GridView1_PageIndexChanging" 
                            onrowcommand="GridView1_RowCommand" PageSize="5">
                    <AlternatingRowStyle BackColor="White" /><Columns>
                    <asp:BoundField DataField="itemkey" HeaderText="Mã" />
                    <asp:BoundField DataField="description" HeaderText="Mô tả" />
                    <asp:TemplateField>
                    <ItemTemplate>
                    <asp:ImageButton ID="ImageButton4" runat="server" CausesValidation="False" CommandName="chon" Height="20px" ImageUrl="~/image/Symbol-Check.png" Width="20px" />
                    </ItemTemplate>
                    <ControlStyle  BackColor="White" BorderColor="White" />
                    <FooterStyle BackColor="White" BorderColor="White" />
                    <HeaderStyle BackColor="White" BorderColor="White" />
                    <ItemStyle BackColor="White" BorderColor="White" />
                    </asp:TemplateField></Columns>
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    </asp:GridView>
                   
    </ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>

</ContentTemplate>
</asp:UpdatePanel>
<uc1:uscMsgBox ID="uscMsgBox1" runat="server" />

